package com.charles.video.system.controller;

import com.charles.video.common.core.controller.BaseController;
import com.charles.video.common.core.responseDomain.AjaxResult;
import com.charles.video.common.core.responseDomain.TableInfo;
import com.charles.video.system.mapper.VideoTagMapper;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author Charles-H
 * 
 * 视频标签控制层
 */
@RestController
@RequestMapping("/video/tag")
public class VideoTagController extends BaseController {
    
    @Resource
    private VideoTagMapper videoTagMapper;
    
    @GetMapping("/getVideoTagData")
    public TableInfo getVideoTagData() {
        startPage();
        return getDataTable(videoTagMapper.queryTagData());
    }
    
    @DeleteMapping("/deleteVideoTag/{tagId}")
    public AjaxResult deleteVideoTag(@PathVariable("tagId") String tagId) {
        return toAjax(videoTagMapper.deleteTag(tagId));
    }
    
}
